package cn.ecut.servlet;

import javax.servlet.*;
import java.io.IOException;

/**
 * @author lujiapeng
 * @className LifeCycle
 * @description TODO
 * @date 2020/9/10 17:00
 **/
public class LifeCycle implements Servlet {

    static{
        System.out.println("LifeCycle 类加载了 ！ ");
    }

    public LifeCycle() {
        System.out.println("构造方法执行了....");
    }

    @Override
    public void init(ServletConfig config) throws ServletException {
        System.out.println("初始化方法执行了");
    }

    @Override
    public ServletConfig getServletConfig() {
        return null;
    }

    @Override
    public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException {
        System.out.println("开始提供服务.....");
    }

    @Override
    public String getServletInfo() {
        return null;
    }

    @Override
    public void destroy() {
        System.out.println("类销毁了...");
    }
}
